// Decompiled by Jad v1.5.7g. Copyright 2000 Pavel Kouznetsov.
// Jad home page: http://www.geocities.com/SiliconValley/Bridge/8617/jad.html
// Decompiler options: packimports(3) fieldsfirst ansi 
// Source File Name:   GTSSymbolHelper.java

package com.sunwayhorizo.health.hl7.datatypes.common;

import com.sunwayhorizo.health.hl7.common.Hl7Exception;
import com.sunwayhorizo.health.hl7.common.VersionInfo;
import com.sunwayhorizo.health.hl7.datatypes.GTS;

// Referenced classes of package oracle.apps.ctb.hl7.types.common:
//            ANYImpl, GTSHolidayHelper, GTSHullImpl, PIVL_TSImpl

public class GTSSymbolHelper
{

    public static final String RCS_ID = "$Header: GTSSymbolHelper.java 115.12 2005/05/13 15:03:46 atomlins noship $";
    public static final boolean RCS_ID_RECORDED = VersionInfo.recordClassVersion("$Header: GTSSymbolHelper.java 115.12 2005/05/13 15:03:46 atomlins noship $", "oracle.apps.ctb.hl7.types.common");

    public static GTS valueOf(String s)
    {
        try
        {
            if(s.equalsIgnoreCase("BID"))
                return (GTS)PIVL_TSImpl.valueOf("/(12 h) IST");
            if(s.equalsIgnoreCase("TID"))
                return (GTS)PIVL_TSImpl.valueOf("/(8 h) IST");
            if(s.equalsIgnoreCase("QID"))
                return (GTS)PIVL_TSImpl.valueOf("/(6 h) IST");
            if(s.equalsIgnoreCase("AM"))
                return (GTS)PIVL_TSImpl.valueOf("H00..11 IST");
            if(s.equalsIgnoreCase("PM"))
                return (GTS)PIVL_TSImpl.valueOf("H12..23 IST");
            GTSHolidayHelper.valueOf("JH");
            if(s.equalsIgnoreCase("JB"))
                return GTSHullImpl.valueOf("J1..5 \\JH");
            if(s.equalsIgnoreCase("JE"))
                return (GTS)PIVL_TSImpl.valueOf("J6..7");
            if(s.startsWith("JH"))
                return GTSHolidayHelper.valueOf(s);
        }
        catch(Hl7Exception ctbexception)
        {
            RuntimeException runtimeexception = ANYImpl.newGTSSymbolException(s);
            StringBuffer stringbuffer = new StringBuffer(runtimeexception.getMessage());
            stringbuffer.append("\nOriginating Stacktrace:\n");
            stringbuffer.append(ctbexception.toString());
            throw runtimeexception;
        }
        throw ANYImpl.newGTSSymbolException(s);
    }

    public GTSSymbolHelper()
    {
    }

}
